<script>
import { h, compile } from 'vue/dist/vue.esm-bundler.js'
import app from '@/app'

export default {
  props: {
    template: String,
    data: Object
  },
  render() {
    // 数据
    const data = this.data
    // 放入 App
    data.app = app

    return h({
      render: compile(this.template || ''), 
      props: Object.keys(this.data)
    }, data)
  }
}
</script>